package com.cloudream.listener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * Created by CloudDreamRan on 2017/8/27.
 */
public class InitListener implements ServletContextListener {

    private static Logger logger = LoggerFactory.getLogger(InitListener.class);

    @Override
    public void contextDestroyed(ServletContextEvent context) {
        logger.info("InitListener Destroyed");
    }

    @Override
    public void contextInitialized(ServletContextEvent context) {
        //在spring之前
        logger.info("InitListener自动加载启动开始");

        logger.info("InitListener自动加载启动结束");
    }

}